/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kleintjes.structural.proxy_pattern.model;

import com.kleintjes.structural.proxy_pattern.Impl.SlowThing;
import java.util.Date;

/**
 *
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class Proxy {
    
    SlowThing slowThing;
    
    public Proxy() {
        System.out.println("Creating proxy at "+new Date());
    }
    public void sayHello() {
        if (slowThing == null) {
            slowThing = new SlowThing();
        }
        slowThing.sayHello();
    }
    
}
